package com.eyaomall.wxmall.common.helper;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

public class AuthHelper {
	
	public static int getMemberId() {
		
		return Integer.valueOf(request().getParameter("apiKey"));
	}
	
	private static HttpServletRequest request() {
		
		return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
	}
}